<template>
  <div>
      <van-picker
        title="性别"
        show-toolbar
        :columns="columns"
        @confirm="onGood"
        :default-index="sexNumber"
        @cancel="$emit('close')"
      />
  </div>
</template>

<script>
export default {
  name: "UpdataAge",
  created() {},
  data() {
    return {
      columns: ['男', '女'],
      sexNumber:this.number
    };
  },
  props:['number'],
  methods: {
    onGood (value, index) {
      // console.log(index)
      // this.sexNumber = index
      this.$emit('updataAge',index)
      this.$emit('close')
    },
  },
};
</script>

<style lang="less" scoped></style>
